package com.hmall.search.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hmall.common.domain.PageDTO;
import com.hmall.search.domain.dto.ItemDTO;
import com.hmall.search.domain.dto.OrderDetailDTO;
import com.hmall.search.domain.po.Item;
import com.hmall.search.domain.query.ItemPageQuery;

import java.io.IOException;
import java.util.Collection;
import java.util.List;
import java.util.Map;


public interface ISearchService extends IService<Item> {

    void deductStock(List<OrderDetailDTO> items);

    List<ItemDTO> queryItemByIds(Collection<Long> ids);

    void restoreStock(List<OrderDetailDTO> items);

    PageDTO<ItemDTO> listSearch(ItemPageQuery query) throws IOException;

    Map filters(ItemPageQuery query) throws IOException;
}
